<!DOCTYPE html>
<html>
<head>
    <title>Javascript PC Emulator</title>
    <link rel="stylesheet" href="jslinux.css">
    <script type="text/javascript" src="utils.js"></script>
    <script type="text/javascript" src="term.js"></script>
    <script type="text/javascript" src="jslinuxwithgui.js"></script>
    <script type="text/javascript" src="pseudoworker.js"></script>
    <script type="text/javascript">
        function megastart() {
            var realstart=function() {
                var prefix='/jslinux_reversed';
                var j1 = new JSLinuxWithGUI(
                        document.getElementById('terminal1'),
                        'linux1',
                        prefix,
                        "console=ttyS0 root=/dev/hda ro init=/sbin/init notsc=1 hibernate=nocompress resume=/dev/hdb"
                        //"console=ttyS0 root=/dev/hda ro init=/sbin/init notsc=1",
						,document.getElementById('canvas1')
                );
				console.log("------------>>/sbin/init-->");
                j1.start();
            };

            // TODO: webkit only (!)
            // TODO: get real size
            var size = 20 * 1024 * 1024;
            var xxx = function (grantedbytes) {
                if (grantedbytes < size) {
                    throw "size not granted";
                }
                realstart();
            };

            if (typeof navigator.webkitPersistentStorage != 'undefined') {
                navigator.webkitPersistentStorage.requestQuota(size, xxx);
            } else {
                webkitStorageInfo.requestQuota(PERSISTENT, size, xxx);
            }

        }
    </script>
</head>

<body onload="megastart()">
<table>
    <tr>
        <td id="terminal1"></td>
        <td id="canvas1"></td>
    </tr>
</table>
<textarea rows="4" cols="40" id="text_clipboard"></textarea><br>
</body>
</html>
